improve canvas.route test to do not overlap.#53
Open
saeedou wants to merge 7 commits intopylover:masterfrom
Open
improve canvas.route test to do not overlap.#53saeedou wants to merge 7 commits intopylover:masterfrom
saeedou wants to merge 7 commits intopylover:masterfrom
Conversation
pylover
requested changes
Sep 18, 2021
Owner
pylover
left a comment
There was a problem hiding this comment.
Initial and trailing portions of your route must be horizontal.
8c9db5a to
e2e3f8d
Compare
pylover
requested changes
Sep 18, 2021
tests/test_canvas.py
Outdated
| c = Canvas() | ||
| c.route(2, 3, 7, 8) | ||
| c.route(2, 4, 7, 8) | ||
| c.route(2, 3, 7, 8, direction='h') |
tests/test_canvas.py
Outdated
| . | . | ||
| . | . | ||
| . | . | ||
| . +-> . |
pylover
requested changes
Sep 19, 2021
Owner
pylover
left a comment
There was a problem hiding this comment.
Everything should be made as simple as possible, but no simpler.
Albert Einstein
adia/canvas.py
Outdated
| self.draw_vline(col1, row1, (row2 - row1)) | ||
| self.set_char(col1, row2, '+') | ||
| self.draw_hline(col1 + 1, row2, col2 - col1 - 1) | ||
| def route(self, col1, row1, col2, row2, direction=None): |
Owner
There was a problem hiding this comment.
direction) instead of direction=None).
tests/test_canvas.py
Outdated
| def test_canvas_route_horizontal(): | ||
| c = Canvas() | ||
| c.route(2, 3, 7, 8, direction='h') | ||
| c.route(2, 3, 7, 8, direction='horizontal') |
Owner
There was a problem hiding this comment.
, 'horizontal' instead of , direction='horizontal'
d485c2c to
de1556a
Compare
de1556a to
fcdee0d
Compare
pylover
requested changes
Sep 19, 2021
Owner
pylover
left a comment
There was a problem hiding this comment.
Please provide more tests for overlap.
pylover
approved these changes
Sep 27, 2021
pylover
requested changes
Sep 27, 2021
Owner
pylover
left a comment
There was a problem hiding this comment.
Please provide more tests for overlap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.